﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/MasterPage.Master" AutoEventWireup="true" CodeBehind="BGM_Strategy_Vision.aspx.cs" Inherits="KPIS.GERP.GBMS.APP_UI.Form.BGM_Strategy_Vision" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

<%@ Register src="../Controls/Panel/UserPanel.ascx" tagname="UserPanel" tagprefix="uc3" %>
<%@ Register src="../Controls/Panel/CommandPanel.ascx" tagname="CommandPanel" tagprefix="uc4" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<Link rel="StyleSheet" href="../../Styles/StyleSheet.css" type="text/css">

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackgroundPosition="None"  > 
</telerik:RadAjaxLoadingPanel>

<telerik:RadAjaxManager runat="server" ID="RadManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
    <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="CmdCtrl">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="PanelGrid" LoadingPanelID="RadAjaxLoadingPanel1"/>
                    <telerik:AjaxUpdatedControl ControlID="PanelList" LoadingPanelID="RadAjaxLoadingPanel1"/>                    
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="Grid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="PanelGrid" LoadingPanelID="RadAjaxLoadingPanel1"/>
                    <telerik:AjaxUpdatedControl ControlID="PanelList" LoadingPanelID="RadAjaxLoadingPanel1"/>
                    <telerik:AjaxUpdatedControl ControlID="CmdCtrl" LoadingPanelID="RadAjaxLoadingPanel1"/>                                               
                </UpdatedControls>
            </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

<div class="defaultFont">

<asp:Label ID="hdSeq" runat="server" ></asp:Label>

<table style="width: 980px; height: 100%;">
    <tr>
    <%--<td width="274px" valign="top">
        <uc3:UserPanel ID="UserCtrl" runat="server" />
    </td>--%>
    <td valign="top">
        <uc4:CommandPanel ID="CmdCtrl" runat="server" />
    </td>

    </tr>
    <tr>
    <td valign = "top" colspan="2"> 
        <br />
        <table width="100%">
            <tr>
                <td  align="left" valign="top" bgcolor="#7DA5E0" 
                    style="padding: 5px; color: #FFFFFF; font-weight: bold;">
                    ตารางแสดงข้อมูลวิสัยทัศน์หน่วยงาน
                </td>
            </tr>
        </table>
        <asp:Panel ID="panelList" runat="server" Height="360px" ScrollBars="Auto" Visible="false">
            <ul id="SourceTypeInfo" class="formList">
                <li><table><tr><td width="150px">รหัส :</td><td><asp:Label ID="lbCode" runat="server" AssociatedControlID="txtCode"></asp:Label>
                    <asp:TextBox ID="txtCode" runat="server" Visible="false" Width="150px" 
                        ValidationGroup="1"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="txtCode" ErrorMessage="*" SetFocusOnError="True" 
                        ValidationGroup="1"></asp:RequiredFieldValidator>
                    </td></tr></table>
                </li>
                <li><table><tr><td width="150px">ชื่อวิสัยทัศน์หน่วยงาน :</td><td><asp:Label ID="lbName" runat="server" AssociatedControlID="txtName"></asp:Label>
                    <asp:TextBox ID="txtName" runat="server" Text="" Visible="false" Width="300px" 
                        ValidationGroup="1"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                        ControlToValidate="txtName" ErrorMessage="*" SetFocusOnError="True" 
                        ValidationGroup="1"></asp:RequiredFieldValidator>
                    </td></tr></table>
                </li>
                <li><table><tr><td valign="top" width="150px">คำอธิบาย :</td><td><asp:Label ID="lbDescr" runat="server" AssociatedControlID="txtDescr"></asp:Label>
                    <asp:TextBox ID="txtDescr" runat="server" Height="100"  Text="" TextMode="MultiLine" Visible="false" Width="300px"></asp:TextBox></td></tr></table>
                </li>
                <li class="lastListItem">
                </li>
            </ul>
        </asp:Panel>
        <asp:Panel ID="panelGrid" runat="server" Height="360px" ScrollBars="Auto" Visible="true">
            <br />
            <telerik:RadGrid GroupingSettings-CaseSensitive="false" ID="Grid" runat="server" AllowFilteringByColumn="true" 
                AllowMultiRowSelection="True" AllowPaging="True" AllowSorting="True" 
                AutoGenerateColumns="False" EnableAJAX="True" OnItemCommand="Grid_ItemCommand"
                GridLines="None" PageSize="8" ShowStatusBar="false">
                <MasterTableView AllowMultiColumnSorting="true" DataKeyNames="Sequence" ClientDataKeyNames="Sequence"
                    Width="100%">
                    <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                    <Columns>
                        <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" ItemStyle-Width="30px"
                            HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                            </telerik:GridClientSelectColumn>
                        <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                            CurrentFilterFunction="Contains" DataField="Code" 
                            FilterControlWidth="100%" HeaderStyle-HorizontalAlign="Center" 
                            HeaderText="รหัส" ItemStyle-Width="100px" ShowFilterIcon="false" ItemStyle-HorizontalAlign="Center"
                            UniqueName="Code">
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn AutoPostBackOnFilter="true"
                            CurrentFilterFunction="Contains" DataField="Name" FilterControlWidth="100%" 
                            HeaderStyle-HorizontalAlign="Center" Visible="false"
                            ShowFilterIcon="false">
                            <ItemTemplate>
                                <asp:Label ID="targetSequence" runat="server" Text='<%# Eval("Sequence") %>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" />

                        </telerik:GridTemplateColumn>                                
                        <telerik:GridTemplateColumn AutoPostBackOnFilter="true"
                            CurrentFilterFunction="Contains" DataField="Name" FilterControlWidth="100%" 
                            HeaderStyle-HorizontalAlign="Center" HeaderText="วิสัยทัศน์หน่วยงาน" 
                            ShowFilterIcon="false" ItemStyle-Width="400px" UniqueName="Name">
                            <ItemTemplate>
                                <asp:LinkButton ID="targetControl" runat="server" CommandName="TargetClick"
                                    Text='<%# Eval("Name") %>'></asp:LinkButton>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" />
                        </telerik:GridTemplateColumn>                                
                        <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                            CurrentFilterFunction="Contains" DataField="Description" 
                            FilterControlWidth="100%" HeaderStyle-HorizontalAlign="Center" 
                            HeaderText="คำอธิบาย" ShowFilterIcon="false" UniqueName="Description">
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings EnableRowHoverStyle="true" >
                    <Selecting AllowRowSelect="True" />
                    <ClientEvents  />
                </ClientSettings>
            </telerik:RadGrid>
        </asp:Panel> 
    </td>
    </tr>
    </table>    
</div>
</asp:Content>
